import React, { Component } from "react";
import { Steps } from "antd";
import { Button} from 'antd'
const { Step } = Steps;

export default class Play extends Component {
  constructor(){
    super()
    this.state = {
      current:0
    }
  }
  next=(e)=>{
    let current = this.state.current 
    console.log(current)
    if(  current > 2) {
      current = 0
    }
    this.setState({
      current:current+1
    })
  }
  render() {
    return (
      <div>
        <Steps current={this.state.current}>
          <Step title="Finished" description="This is a description." />
          <Step
            title="In Progress"
            subTitle="Left 00:00:08"
            description="This is a description."
          />
          <Step title="Waiting" description="This is a description." />
        </Steps>
        <Button onClick={this.next}>点击下一步</Button>
      </div>
    );
  }
}
